package com.bjtang.book.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.bjtang.book.dto.ReturnDto;
import com.bjtang.book.util.ReturnUtil;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api(tags = "错误综合管理")
@RestController
@RequestMapping(value = "/err/")
public class ErrController {

	@ApiOperation("访问权限错误-权限不足")
	@GetMapping("/403/")
	public ReturnDto Get403() {
		return ReturnUtil.error(403, "获取失败!没有访问权限");
	}

	@ApiOperation("访问权限错误-没有登录")
	@GetMapping("/401/")
	public ReturnDto Get401() {
		return ReturnUtil.error(401, "没有登录");
	}
}
